package com.hr.controller;



import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.api.ApiController;
import com.baomidou.mybatisplus.extension.api.R;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hr.entity.AoaNoticeUserRelation;
import com.hr.service.AoaNoticeUserRelationService;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.io.Serializable;
import java.util.List;

/**
 * (AoaNoticeUserRelation)表控制层
 *
 * @author makejava
 * @since 2022-06-23 11:39:42
 */
@RestController
@RequestMapping("aoaNoticeUserRelation")
public class AoaNoticeUserRelationController  {
    /**
     * 服务对象
     */
    @Resource
    private AoaNoticeUserRelationService aoaNoticeUserRelationService;

    @PostMapping("/add")
    public ResponseEntity<String> add(@RequestBody AoaNoticeUserRelation aoaNoticeUserRelation){
        boolean b = aoaNoticeUserRelationService.save(aoaNoticeUserRelation);
        //判断是否添加成功
        if(b){
            return ResponseEntity.ok("添加成功");
        }else{
            return ResponseEntity.ok("添加失败");
        }
    }
}

